package com.ibeetl.admin.api.dao;

import com.ibeetl.admin.api.entity.Travel_attractions_line;
import com.ibeetl.admin.core.entity.CoreAudit;
import org.apache.ibatis.annotations.Insert;
import org.beetl.sql.core.page.PageRequest;
import org.beetl.sql.core.page.PageResult;
import org.beetl.sql.mapper.BaseMapper;
import org.beetl.sql.mapper.annotation.Root;
import org.beetl.sql.mapper.annotation.SqlResource;
import org.beetl.sql.mapper.annotation.Update;

import java.util.Date;
import java.util.List;
import java.util.Map;

@SqlResource("api.travelAttractionsLine")
public interface TravelAttractionsLineDao  extends BaseMapper<Travel_attractions_line> {

    List<Travel_attractions_line> queryByUserId(long userId);
    @Update
    void updateState(Long attraction_id, int state, Date update_dt);

    List<Long> queryNewIdByUserId(Integer userId);

    Travel_attractions_line queryById(Long id);

    @Update
    void save(Map params);
    @Update
    void update(Map params);

    List<Travel_attractions_line> queryNoAudit();
//    PageResult<Travel_attractions_line> queryNoAudit(PageRequest<Travel_attractions_line> query);
    @Update
    void audit(Map map);

    @Update
    void addViewsNum(Long attractionId);

    @Update
    void addLikeNum(Long attractionId);

    List<Travel_attractions_line> queryByState(Long userId, Integer state);
}
